﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FsCarInfo.Core.Entity.IRespositories;
using FsCarInfo.Core.Entity.IServices;
using HMIS.FrameWork.DomainBase;
using FsCarInfo.Core.Entity;

namespace FsCarInfo.Facade.Impl
{
    public class BCarFacadeImpl : IBCarFacade
    {
        private readonly IBCarRepository BCarRepository;
		
		public BCarFacadeImpl(IBCarRepository BCarRepository)
        {
			this.BCarRepository = BCarRepository;
        }

        #region IBCarFacade 成员

		#region Entity

		public bool IsFieldExist(string fieldName, string fieldValue, string id)
        {
			return BCarRepository.IsFieldExist(fieldName, fieldValue, id);
        }

		public void SaveOrUpdate(BCar entity)
        {
			this.BCarRepository.SaveOrUpdate(entity);
        }

        public void Delete(string id)
        {
			BCarRepository.Delete(id);
        }

		public void PhysicsDelete(string id)
		{
			BCarRepository.PhysicsDelete(id);
		}

		public IList<BCar> GetAll()
		{
			return BCarRepository.GetAll();
		}

		public BCar Get(string id)
        {
			return BCarRepository.Get(id);
        }

		public BCar GetById(string id)
		{
			return BCarRepository.GetById(id);
		}

		public BCar Load(string id)
        {
			return BCarRepository.Load(id);
		}

		#endregion

		#region Query

		public IList<BCar> GetPlistAll(int start, int limit, string sort, string dir, List<DataFilter> filters, out long total)
		{
			return BCarRepository.GetPlistAll(start, limit, sort, dir, filters, out total);
		}

		#endregion

		#endregion
	}
}
